package com.learn.micro_mall.domain.vo.member;

import lombok.Data;

@Data
public class LevelPointOrderNumConfigurationVO {
    /**
     * 使用订单数获取等级值
     */
    private Boolean useOrderNumGetLevelPoint;

    /**
     * 一笔订单获取的等级值
     */
    private Integer levelPoint;

    public void valid() throws Exception {
        if(Boolean.valueOf(true).equals(useOrderNumGetLevelPoint) && levelPoint <= 0){
            throw new Exception("等级值配置设置错误");
        }
    }
}
